package com.swg.myspring.main;

import com.swg.myspring.service.PersonService;
import com.swg.myspring.util.SwgClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main1 {
    public static void main(String[] args) {
        SwgClassPathXmlApplicationContext sctx = new SwgClassPathXmlApplicationContext("beans.xml");
        PersonService personService = (PersonService)sctx.getBean("personService",PersonService.class);
        personService.sayHello();
    }
}
